home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 115 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: nntp.coast.net!torn!nott!uottawa!jxie
  2. From: jxie@csi.uottawa.ca (Jun Xie)
  3. Newsgroups: comp.lang.c++
  4. Subject: ******** Questions about MSVC++ programming ********
  5. Date: 2 Jan 1996 16:22:15 GMT
  6. Organization: University of Ottawa
  7. Message-ID: <4cbm3n$1r4i@mercury.cc.uottawa.ca>
  8. NNTP-Posting-Host: grdb.csi.uottawa.ca
  9. Mime-Version: 1.0
  10. Content-Type: Text/Plain; charset=ISO-8859-1
  11. Content-Transfer-Encoding: 8bit
  12.  
  13. Hi,
  14.  
  15. I am new to the MSVC++ Ver 1.5 and MFC and have following questions.
  16. I appreciate it very much if you could answer any one of them or
  17. tell me the place (book, webpage, online help etc) where I can find
  18. the answers.
  19.  
  20. 1) How to change the cursor to hourglass shape with MFC?
  21.    I tried the following SDK function, but it did not work.
  22.    HCURSOR HOldCursor = ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
  23.    ::ShowCursor(TRUE);
  24.  
  25. 2) what is the output stream class for printing?
  26.    I know the standard print is _stdprn, but it is for MS DOS only and
  27.    I want to send a character string to the printer under windows.
  28.    As well, I wonder how to print the graphics image drawn on the client
  29.    device context.
  30.  
  31. 3) How to use the VBX gauge control in MSVC++?
  32.    I know how to add it to the App Studio control palette, but do not know
  33.    what member functions I should call to work with it.
  34.  
  35. 4) How to get the current width and height of the client device context?
  36.    I hope my graphics images drawn on the DC are proportional to its size.
  37.    That means if you change the size of the window, the graphics image will
  38.    change accordingly. I tried to use GetDeviceCaps() as follows, but the
  39.    width and heigth returned are always 1024 and 768 respectively.
  40.  
  41.     void CXXXView::OnXXX()
  42.     {
  43.         // TODO: Add your command handler code here
  44.         CClientDC dc(this);
  45.         int width, height;
  46.  
  47.         width = dc.GetDeviceCaps(HORZRES);
  48.         height = dc.GetDeviceCaps(VERTRES);
  49.             .
  50.             .
  51.             .
  52.     } 
  53.  
  54. Thank you for your attention.
  55.  
  56.